package io.renren.common.enums;

/**
 * 系统错误码枚举
 *
 * @author created by Singer email:313402703@qq.com
 * @time 2018/9/29
 * @description
 */
public enum ErrorCode {


    SUCCESS(200, "成功"),
    SUCCESS_VUE(100, "成功"),
    PARAM_ERROR(000004, "参数错误"),
    ERROR(500, "业务处理异常"),
    LOGIN_ERROR_CODE(501, "登录失效,需要验证登录"),
    NO_REQUIRED_PARAM_ERROR(0000005, "参数缺失"),
    AUTH__ERROR(0000007, "认证错误"),
    E_502(8, "没有权限"),
    ERROR_OLD_PASSWORD(9, "旧密码输入错误"),
    ERROR_UPDATE_PASSWORD(10, "修改密码失败"),
    ERROR_TOKEN_INVALID(00013, "token无效，需要重新登陆"),
    ERROR_KAPTCHA_CODE_INVALID(0000014, "图形验证码错误"),
    ERROR_KAPTCHA_CODE_NULL(0000014, "请输入验证码"),
    ERROR_APP_USER_EXISTED(0000015, "用户已经存在"),
    ERROR_MESSAGE_INVALID(0000016, "短信验证码错误"),
    ERROR_APP_USER_NOT_EXISTED(0000017, "该用户不存在"),
    ERROR_APP_REPEAT_PWD_NOT_EQUAL_ERROR(18, "重复密码不相等"),
    ERROR_APP_USER_INFO_REPEAT_SET_ERROR(19, "无此用户"),
    ERROR_MAKE_LIKE_USERSELF(000031, "不能点赞自己的动态"),
    ERROR_MAKE_COLLECT_USERSELF(000032, "不能收藏自己的动态"),
    ERROR_ORDER_OUT_OF_STOCK(000040, "商品库存不足"),
    ERROR_ORDER_ID_PARAM(000041, "错误订单参数"),
    ERROR_ORDER_STATUS_PARAM(000042, "订单状态错误,不能取消"),
    ERROR_ORDER_VERIFY_PARAM(000043, "校验订单参数为空"),
    ERROR_ORDER_COMMEND(000044, "已提醒卖家发货,请勿重复操作!"),
    ERROR_ORDER_REFUND(000045, "请勿重复退款"),
    ERROR_SEND_MESSAGE(000046, "验证码发送失败"),
    ERROR_LOW_BALANCE(000047, "您的余额不足"),
    ERROR_YX(48, "云信异常"),
    ERROR_UPLOAD(49, "上传失败"),
    ERROR_NET(000050, "网络异常"),
    EXIST_NOT(000051, "不存在"),
    EXIST_PRO(000052, "已报名此项目"),
    ENTER_PRO_NOT(000053, "项目当前无法报名"),
    IS_AUTH_NOT(000054, "请先实名认证"),
    IS_TALENT_NOT(000054, "请先人才认证"),
    ENTER_PRO_BEFORE(000055, "未到报名时间"),
    ENTER_PRO_AFTER(000056, "报名时间已过"),
    ENTER_PRO_LIMIT_SUM(000057, "工期不能小于项目工期"),
    ENTER_PRO_AMOUNT(58, "报价不能小于项目报价"),
    COMMIT_ALREAD(59, "项目已提交"),
    CHECOUTOUT_PRO(000060, "项目未中标"),
    DOING_NOT_PRO(000061, "项目未进行"),
    DOING_PRO(000062, "项目不在报名中，无法撤回"),
    DOING_ALREADY_PRO(000063, "项目进行中"),
    CHECK_PRO(000064, "项目不满足验收状态"),
    CHECK_FINISH_PRO(00064, "项目不满足完成状态"),
    CHECK_ALREADY_PRO(000065, "项目已经验收"),
    DATETIME_FORMAT_ERROR(000066, "时间格式错误"),
    USER_TYPE_ERROR(000067, "用户类型错误"),
    ENTER_SELF(68, "不能报名自己发布的项目"),
    REPEAT_PUSH(69, "请不要频繁操作"),
    ALREADY_BIND(000070, "该卡已绑定"),
    BANK_NOT(000070, "该卡不存在"),
    DEFAULT_BANK_DEL(000071, "默认卡不允许删除"),
    DEFAULT_BANK_ALREADY(000072, "此卡已经是默认卡"),
    NOT_EXSIZE_HOTAL(000073, "该酒店不存在"),
    NOT_SALE(000075, "未上架"),
    TIME_ERROR(000077, "结束时间在开始时间之前"),
    TIME_GT_NOW(78, "不能选择当前时间之前的时间"),
    NOT_ENUGH_CARD_NUM(79, "会员卡次数不足"),
    NOT_PAY_ERROR(80, "支付失败"),
    NOT_PAY_ORDER(81, "没有待支付订单"),
    NOT_EXSIZE_ORDER(82, "订单不存在"),
    NOT_CANCLE_ORDER(83, "只能取消未支付订单"),
    SALE_AFTER(84, "订单已取消"),
    SALE_AFTERING(84, "订单售后中"),
    VERIFY_FAIL(86,"认证失败"),



            ;

    /**
     * 错误码code
     */
    private Integer code;

    /**
     * 错误信息
     */
    private String message;

    ErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
